#include "functionFitness.h"

using namespace std;

class AG{
	private:
		vector<vector<bool> > vChrom;
		vector<double> fitness;
		vector<int>sortIndx;
		int nGenes,sType,nChrom,nComp,G,indMaxFitness,maxGenerations;
		double tCross,tMut,desFitness,maxFitness;
		void loadConfig(string file);
		void initRandomPopulation();
		void getFitness();
		void cross();
		void mutation();
		void selectNextPopulation();
		void roulette();
		void window();
		void sortFitness();
		void competency();
		void printChromosome ();
		void printFitness ();
	public:
		AG();
		AG(string file);
		vector<bool> evolution();
};


